﻿using System.Web.UI;
using System.Web.UI.WebControls;

namespace Succell.Dnn.JQuery.UI
{
    /// <summary>
    /// A TabPane for use with the <see cref="Tabs"/> web control.
    /// </summary>
    [ToolboxData("<{0}:TabPane runat=\"server\"></{0}:TabPane>")]
    public class TabPane : View
    {
        #region properties

        /// <summary>
        /// Gets or sets the title for the tab pane.
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets whether the tab pane is disabled.
        /// </summary>
        public bool Disabled { get; set; }

        /// <summary>
        /// Gets or sets whether the tab pane is visible.
        /// </summary>
        public override bool Visible
        {
            get
            {
                if (this.Parent == null)
                {
                    return base.Visible;
                }
                return (this.Parent.Visible);
            }
            set
            {
                base.Visible = value;
            }
        }

        #endregion
    }
}
